﻿using Domain.Entities;
using Domain.Entities.MentalHealth;
using FluentMigrator;
using FrameworkCore.Extensions;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AiBLSmartEdu.Module.AIMentalHealthSelfAssessment.API.Migrations;

[Migration(20250701810)]
public class MedicalQuestionAnswerPairsAddColumn : ForwardOnlyMigration
{
    public override void Up()
    {
        Alter.Table(MigrationExpressions.GetTableName(typeof(MentalHealthSelfAssessment)))
          .AddColumn(MigrationExpressions.ColumnNameFor<MentalHealthSelfAssessment>(nameof(MentalHealthSelfAssessment.CustomerId))).AsInt64().Nullable().WithColumnDescription("关联用户ID")
          .AddColumn(MigrationExpressions.ColumnNameFor<MentalHealthSelfAssessment>(nameof(MentalHealthSelfAssessment.PsychologicalDescription))).AsString(int.MaxValue).Nullable().WithColumnDescription("心理描述")
          .AddColumn(MigrationExpressions.ColumnNameFor<MentalHealthSelfAssessment>(nameof(MentalHealthSelfAssessment.PsychologicalQuestionsPrompt))).AsString(int.MaxValue).Nullable().WithColumnDescription("心理测试题提示词（用于生成心理测试题）")
          .AddColumn(MigrationExpressions.ColumnNameFor<MentalHealthSelfAssessment>(nameof(MentalHealthSelfAssessment.PsychologicalQuestions))).AsString(int.MaxValue).Nullable().WithColumnDescription("心理测试题")
          .AddColumn(MigrationExpressions.ColumnNameFor<MentalHealthSelfAssessment>(nameof(MentalHealthSelfAssessment.AnswerQuestions))).AsString(int.MaxValue).Nullable().WithColumnDescription("答题")
          .AddColumn(MigrationExpressions.ColumnNameFor<MentalHealthSelfAssessment>(nameof(MentalHealthSelfAssessment.AnalyzeAnswerQuestionsPrompt))).AsString(int.MaxValue).Nullable().WithColumnDescription("解析答题提示词")
          .AddColumn(MigrationExpressions.ColumnNameFor<MentalHealthSelfAssessment>(nameof(MentalHealthSelfAssessment.AnalysisResult))).AsString(int.MaxValue).Nullable().WithColumnDescription("解析答题结果");
    }
}